<template>
  <view class="container">
    <!-- 顶部组件 -->
    <u-navbar
      id="nav-bar"
      :is-back="true"
      :background="{ background: '#fff' }"
      :border-bottom="false"
      title="设置"
    ></u-navbar>
    <view class="content">
      <u-cell-group>
        <u-cell-item
          title="修改登录密码"
          :border-top="false"
          @click="navigateTo('/pages/setting/changePsw')"
        ></u-cell-item>
        <u-cell-item
          title="关于我们"
          :value="version"
          :border-bottom="false"
          @click="navigateTo('/pages/setting/aboutUs')"
        ></u-cell-item>
      </u-cell-group>
      <u-gap
        height="30"
        bg-color="#f5f5f5"
      ></u-gap>
      <!-- <u-cell-group>
        <u-cell-item
          title="注销账号"
          :border-top="false"
        ></u-cell-item>
      </u-cell-group> -->
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return { version: '' };
  },
  onLoad() {
    const accountInfo = uni.getAccountInfoSync();
    this.version = accountInfo.miniProgram.version || '-';
  },
  methods: {
    navigateTo(url) {
      uni.navigateTo({
        url: url
      });
    }
  }
};
</script>

<style lang="scss" scoped>
page {
  background-color: #f5f5f5;
}

.container {
  width: 100%;
  min-height: 100vh;
  padding: 30rpx;
  text-align: center;
  background-color: #f5f5f5;
}

.content {
  width: 100%;
  background: #ffffff;
  border-radius: 10rpx;
  overflow: hidden;
}
</style>
